// import '../../assets/effect-rmblack';
import '../../assets/video-alpha';
var sceneReadyBehavior = require('../behavior-scene/scene-ready');

Page({
  behaviors: [sceneReadyBehavior],
  data: {
    colList: [{
    //   id: 'asdfa1',
    //   type: 'gltf',
    //   markerImg: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/marker/2dmarker-test.jpg',
    //   resources: [
    //     {
    //       id: 'resgltf1',
    //       src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb',
    //       position: {
    //         x: 0.2,
    //         y: 0,
    //         z: -0.2
    //       },
    //       rotation: {
    //         x: 0,
    //         y: -50,
    //         z: 0
    //       },
    //       scale: 0.6
    //     }, {
    //       id: 'resgltf2',
    //       src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb',
    //       position: {
    //         x: 0.4,
    //         y: 0,
    //         z: 0.3
    //       },
    //       rotation: {
    //         x: 0,
    //         y: -50,
    //         z: 0
    //       },
    //       scale: 0.5
    //     }, {
    //       id: 'resgltf3',
    //       src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb',
    //       position: {
    //         x: -0.3,
    //         y: 0,
    //         z: 0.3
    //       },
    //       rotation: {
    //         x: 0,
    //         y: -50,
    //         z: 0
    //       },
    //       scale: 0.4
    //     }
    //   ]
    // },
    // {
    //   id: 'sead2',
    //   type: 'gltf',
    //   markerImg: 'https://testar.yishuerweima.com/uploads/20240731/7f910309cd1f8585681c43bc216d6ae0.png',
    //   resources: [
    //     {
    //       id: 'seadres1',
    //       // src: 'https://testar.yishuerweima.com/uploads/20240731/huGLTF1.gltf',
    //       src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb',
    //       position: {
    //         x: 0.2,
    //         y: 0,
    //         z: -0.2
    //       },
    //       rotation: {
    //         x: 0,
    //         y: -50,
    //         z: 0
    //       },
    //       scale: "1,0.9,0.9",
    //       width: 400,
    //       heigth: 500
    //     }
    //   ]
    // },
    // {
      id: 'sead3',
      type: 'video',
      markerImg: 'https://testar.yishuerweima.com/uploads/20240803/cc5a376ffa4a6ce853c380122319f772.jpg',
      resources: [
        {
          id: 'seadres2',
          src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/xr-frame-team/2dmarker/hikari-v.mp4',
          position: {
            x: 0.2,
            y: 0,
            z: -0.2
          },
          rotation: {
            x: 0,
            y: -50,
            z: 0
          },
          scale: "1,0.9,0.9",
          loop: 'true',
          autoplay: 'true',
          width: 400,
          height: 500
        }
      ]
    },
    {
      id: 'sead4',
      type: 'video',
      markerImg: 'https://testar.yishuerweima.com/uploads/20240802/df055f285d6b95d78e769b5ac49d9547.jpg',
      resources: [
        {
          id: 'seadres3',
          src: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/videos/cat.mp4',
          position: {
            x: 0.2,
            y: 0,
            z: -0.2
          },
          rotation: {
            x: 0,
            y: -50,
            z: 0
          },
          scale: "1,0.9,0.9",
          loop: true,
          autoplay: true,
          width: 400,
          height: 500
        }
      ]
    }],
    debugMsg: 'Defalut Words',
  },
  handleTrackerChange(cur) {
    const item = cur.detail;
    this.setData({
      debugMsg: 'handleTrackerChange:' + item.name
    })
  },
  tracked() {
    console.log('page tracked',);
    this.setData({
      arTrackerState: 'tracked'
    })
  },
  lostTrack() {
    console.log('page lostTrack');
    this.setData({
      arTrackerState: 'isTracking'
    })
  },
  handleARTrackerError({ detail }) {
    console.log('page handleARTrackerError', detail);
  }
});